#pragma once

#include "RenderCommand.h"
#include "ViewCamera.h"
#include "FysicsEngine/objects/Light.h"
#include "Shader.h"
#include "FysicsEngine/objects/Object.h"

namespace Fysics {

	class Renderer
	{
	public:
		static void BeginScene(const ViewCamera& camera);
		static void EndScene();
		static void Init();
		static void PushObject(const Object* obj);
		static void UpdateLight(const Light* light);

		static void Submit(const std::shared_ptr<Shader>& shader,
			const std::shared_ptr<VertexArray>& vertexArray);

		inline static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); }

	private:
		struct RenderData
		{
			glm::mat4 ViewMatrix;
			glm::mat4 ProjectionMatrix;
			glm::mat4 ModelMatrix;

			glm::vec3 LightColor;
			glm::vec3 LightPos;
			glm::vec3 ObjColor;
			glm::vec3 ViewPos;
		};

		static RenderData* m_RenderData;
	};	
}